<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>磯子日本語教室</title>
<style type="text/css">
<!--
.STYLE1 {
	font-size: 36px;
}
.STYLE2 {
	font-size: 12px;
}
-->
</style>
</head>
<body>
<f:view>
<table  height="%90" border=1>
<tr><td width="956"  height="80" ><div align="center" class="STYLE1">磯子日本語教室</div></td>
</tr>
<tr><td  height="1000" ><table width="100%" height="100%" border="1">
      <tr>
        <td width="18%">
		<table width="200" height="1000" border="1">
          <tr>
            <td width="200" height="280">
            <c:if test="${loginBean.loginFlg == '0'}">
            <h:form  id="hhh">
              <table width="100%" border="0">
                <tr>
                  <td width="130"><div align="center" class="STYLE2">ユーザーID</div></td>
                  <td width="50">

                  <h:inputText
							value="#{loginBean.user_id}" maxlength="8"
							style="height:15px" />
				  </td>
                </tr>
                <tr>
                  <td height="25"><div align="center" class="STYLE2">パースワド</div></td>
                  <td>
                  <h:inputSecret
							value="#{loginBean.password}" maxlength="16"
							style="height:15px" />
                  </td>
                </tr>
                </table>
                <table width="200"  border="0">
                <tr>
                  <td><CENTER><h:commandButton type="submit"
							action="#{loginAction.action}" value="登録"
							 /></CENTER> 
						    </td><td><CENTER>
                    <h:commandButton type="submit"
							action="new" value="新規"
							 /></CENTER>
                    </td>
                </tr>
              </table>
              </h:form>
              </c:if>
              <c:if test="${loginBean.loginFlg == '1'}">
              <h:form  id="f02">
              <c:out value="${loginBean.user_id}欢迎你的到来！"></c:out>
              
              <CENTER><h:commandButton type="submit"
							action="#{loginAction.logOut}" value="ログアウト"
							 /></CENTER> 
              </h:form>
              </c:if>
              </td>
          </tr>
          <tr>
            <td>&nbsp;</td>
          </tr>
        </table>
		
		</td>
        <td width="66%" valign="top">
          <table width="100%" height="0"  border="1" table>
        <tr><td width="590" height="382" valign="top">
        <frameset cols="80%">
          <frame src="./index.html" name="allmessage"/>
        </frameset>
        </td>
        </tr>
        <tr><td height="107" valign="top">
        <h:form  id="f03" target="allmessage" >
        <h:inputTextarea value="#{loginBean.msg}" style="width:580px;height:60px">
        
        </h:inputTextarea>
        <h:commandButton type="submit"
							action="#{loginAction.sendMsg}" value="send"
							 /> 
        </h:form>
        </td>
        </tr>
        </table>
        </td>
        <td width="16%">&nbsp;</td>
      </tr>
    </table></td>
</tr>
</table>
</f:view>
</body>
</html>